<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <title>个人资料</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">

    <link rel="stylesheet" href="http://at.alicdn.com/t/font_547056_uodz6wnck1grdx6r.css">
    <link rel="stylesheet" href="/sunfc/css/weui.min.css">
    <link rel="stylesheet" href="/sunfc/css/style.css">
    <style>
        .weui-cell{height:40px}
        .weui-media-box {
            padding: 0px;
        }
        .weui-cell {
            padding: 0px 15px;
        }
        a{color: black}
        button{
            outline: 0;
        }
        .index-top1{height: 40px;line-height: 40px;position: fixed;top:0;left:0;width: 100%;z-index: 100;}
    </style>
</head>
<body   style="" >

<div  style="background: linear-gradient(#C2BEBB,white 50%);">

    <div class="index-top1"  >
        <div class="index-back">
            <a href="{:url('index/sunfc.passenger/index')}">
            <span   style="color: #A39F9C;margin-left: 12px;" class="icon  icon-leftarrow"></span>
            </a>
        </div>
        <div class="index-right"  style="opacity: 1">
            <a href="{:url('sunfc.users/messedit')}"   style="color: #828282" >编辑资料</a>
        </div>
    </div>
    <!-- 这里写内容 -->
    <div  style="padding-top: 100px;text-align: center">

        <div>
            <img   style="text-align: center;width:100px;height:100px;border-radius:50px;" src="{$result.headimgurl}">
            <div   style="margin: 10px 0">
                <span  style="font-size: 15px;font-size: 22px;font-weight: bold">{$result.nickname}</span>
                <!--<span class="icon icon-nan"  style="color: dodgerblue"></span>-->
                {if condition="$result.sex == 1"}
                <img src="/sunfc/images/sex1.png" width="15" style="margin-top: -7px;"/>
                {elseif condition="$result.sex == 2"/}
                <img src="/sunfc/images/sex2.png" width="15" style="margin-top: -7px;"/>
                {else /}
                {/if}

            </div>
            {if condition="$signIn == 0"}
            <button id="bt1" style="width: 30%;background: #fe8200;border-radius: 5px;color: white;height: 25px ;font-size: 10px">签到</button>
            {else /}
            <button id="bt2" style="width: 30%;background: #CCCCCC;border-radius: 5px;color: white;height: 25px ;font-size: 10px">已签到</button>
            {/if}

            {if condition="$result.autograph != null"}
            <div  style="font-size: 10px;margin: 10px 0    ;color: #676767">{$result.autograph}</div>
            {else /}
            <div  style="font-size: 10px;margin: 10px 0    ;color: #676767">还未填写个性签名，介绍一下自己吧</div>
            {/if}

        </div>




    </div>
    <div style="background:white;border: 1px solid  #f4f4f4;margin: 20px;border-radius: 5px;margin-top: 35px">
        <a  href="{:url('index/sunfc.index/show')}">
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <span  class="icon icon-huiyuan" style="width:20px;margin-right:5px;display:block;color: #F6B080"></span>
                </div>
                <div class="weui-cell__bd"  style="width: auto;float: left">
                    <p  style="color: #676767">积分会员</p>
                </div>
                <div class="weui-cell__ft">进入会员主页</div>
            </div>
        </a>
        <a href="{:url('sunfc.passenger/travel_records')}">
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <span  class="icon icon-xingcheng-copy" style="width:20px;margin-right:5px;display:block;color: #F6B080"></span>
                </div>
                <div class="weui-cell__bd"  style="width: auto;float: left">
                    <p  style="color: #676767">我的行程</p>
                </div>
                <div class="weui-cell__ft">进入行程记录</div>
            </div>
        </a>
    </div>
    <div style="background:white;border: 1px solid  #f4f4f4;margin: 20px;border-radius: 5px;">
        <a  href="{:url('sunfc.users/authuser')}">
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <span  class="icon icon-shimingrenzheng" style="width:20px;margin-right:5px;display:block;"></span>
                </div>
                <div class="weui-cell__bd"  style="width: auto;float: left">
                    <p  style="color: #676767">实名认证</p>
                </div>
                <div class="weui-cell__ft">
                    <span class="icon  icon-right-1">
                    </span>
                    {switch name="$result.auth_user"}
                    {case value="-1"}未通过{/case}
                    {case value="0"}未认证{/case}
                    {case value="1"}认证中{/case}
                    {case value="2"}已认证{/case}
                    {/switch}
                </div>
            </div>
        </a>


        <!--{if condition="($result.auth_driver == 2) OR ($result.auth_driver == 1)"}-->
        <a  href="{:url('sunfc.users/authdriver')}">
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <span  class="icon icon-cheliangliebiao" style="width:20px;margin-right:5px;display:block;"></span>
                </div>
                <div class="weui-cell__bd">
                    <p  style="color: #676767">车主认证</p>
                </div>
                <div class="weui-cell__ft">
                    <span class="icon  icon-right-1">
                    </span>
                    {switch name="$result.auth_driver"}
                    {case value="-1"}未通过{/case}
                    {case value="0"}未认证{/case}
                    {case value="1"}认证中{/case}
                    {case value="2"}已认证{/case}
                    {/switch}
                </div>
            </div>
        </a>
    </div>
</div>


<div style="pt40">
</div>
<script src="/sunfc/js/jquery.js"></script>
<script>
    $(document).ready(function () {
        $('#bt1').click(function () {
            document.getElementById('bt1').innerText= '签到中';
            if($('#bt1').text() == '签到中'){
                //setTimeout(function(){ alert('已签到'); }, 1000);
                        $.post("{:url('sunfc.users/signIn')}",
                            {
                                sign : 1,
                                number : 50,
                                content : "签到",
                                type : 1
                            },
                            function(data){
                                if(data.code==1){
                                    $('#bt1').attr('style',"width: 30%;background: #CCCCCC;border-radius: 5px;color: white;height: 25px ;font-size: 10px");
                                    document.getElementById('bt1').innerText= '已签到';
                                    setTimeout(function(){alert(data.msg); }, 500);
                                    window.location.href="{:url('index/sunfc.users/index')}";
                                }else {
                                    alert(data.msg);
                                }
                            });


            }else {
                setTimeout(function(){ alert('未签到'); }, 1000);
            }
        })
    })
</script>
</body>
</html>
